You are here: Reference Guide > Report Writing > Points of Integration

Points of Integration

Auto-populated formulae

When Jiwa runs a report, it looks through the list of formulae that exist in the report.  If a formula has a particular name, Jiwa will clear the contents of the formula and set it to be a certain value.  For example, if a formula exists in the report with a name of “Pass_User” (case insensitive), the contents, or value, of the formula will be set to the username of the Jiwa user who is running the report.  Refer to Appendix B for a full list of auto-populated formulae.

Range parameters

Range parameters are the most important component of writing reports for Jiwa.  These are the real glue between Jiwa and Crystal Reports.  These allow the user to choose ranges or options that affect the set of data that the report will show, and how it will present that data.  Below is a screen shot of the ranges as presented to the user for the “Inventory Maintenance Listing” report (the filename of which is “ININF000 - Inventory Maintenance Listing.rpt”).

How did Jiwa know to show these particular range parameters?  Jiwa looked inside the “Record Selection Formula” section of the report (in the Crystal Report editor, you can access the “Record Selection Formula” by loading a report and going to Report Selection Formulas Record).   Below is what the “Record Selection Formula” looks like for the “Inventory Maintenance Listing” report.

The first range parameter is “Pass_GroupBy” and gives the user a combo-box from which to pick a single value.  Below is a screen shot that shows the expanded combo-box after the user has clicked on it.

In the case of this particular report, the “Pass_GroupBy” formula (the range parameter with the caption of “Select Grouping” in the screenshot above) controls whether the inventory items are simply output one after the other in part number order, or whether they are “grouped” by classification – i.e. list all the inventory items with a classification of “Building Accessories” first, then leave a little gap, then list all the inventory items with a classification of “Cleaning” second, and so-on.  Here is the content of the “Pass_GroupBy” formula:

//Type = NumberCombo

//Caption = Select Grouping

//ADD=1,Classification

//ADD=2,None

//Default=2

1

Note that much of the formula, as far as Crystal Reports is concerned, are comments (denoted by the //).  Crystal Reports, of course, ignores such lines – they mean nothing to Crystal Reports and have no bearing on the report’s output.  The last line is not a comment line.  Therefore, Crystal Reports sees the formula “Pass_GroupBy” as having a value of 1.  If you were to run this report within the Crystal Reports Designer, Crystal Reports would deem the value of this formula to be 1.

The comment lines do mean something to Jiwa, however.  When Jiwa loads a report, it looks through all the formulas inside the record selection formula that have a name starting with “Pass_”.  For each such formula, Jiwa reads it contents.  Jiwa “passes” the comment lines, and in the case of a range parameter, uses them in the construction of the ranges grid on the ranges tab of the report screen.

The above formula indicates it’s “Type” to be “NumberCombo” as per the first line (Refer to Appendix C for a full list of possible “Types”).  Therefore, Jiwa sets up a combo box in the ranges grid.  Line 2 defines a “Caption” – Jiwa places this to the left of the combo box on the ranges grid.  The “Caption” can be whatever you like.  Lines 3 and 4 are used by Jiwa to populate the combo box with values that the user may pick from.  If more than 2 pick values are required, additional “ADD” lines are inserted into the formula thus:

//Type = NumberCombo

//Caption = Select Grouping

//ADD=1,Classification

//ADD=2,None

//ADD=3,Category 1

//ADD=4,Category 2

//Default=2

1

Finally, the 7th line (the 5th line before we inserted the extra ADDs) sets the combo box’s initial value. 

Appendix C shows examples of all the different types of range parameters that are possible, from simple number boxes through to parameters that use the Jiwa search screen for value selection.

Refer to "Order of Events"

Copyright © 2012 Jiwa Financials. All rights reserved.